﻿<style>
    .ttProfilViewer {
        max-width: 800px !important;
    }
    .frameProfil {
        border: 0px;
    }
</style>
<script type="text/javascript">
    var profilViewerManager = new function () {
        var ttProfilViewer = null;

        this.showProfil = function (DetailPopup) {
            // load wordreference frame 
            var url = "/Contact/DetailPopup/" + DetailPopup;
            //console.log(url);
            if (ttProfilViewer == null) {
                ttProfilViewer = $("<div />").qtip({
                    id: "ttTranslator",
                    content: { text: "<iframe class='frameProfil' id='frameProfilViewer' src=\"" + url + "\" width=675 height=450></iframe>", title: { text: "@Resources.Intercamber.ViewProfile", button: true } },
                    position: { my: 'center', at: 'center', target: $(window), viewport: $(window), adjust: { method: "shift", x: 0, y: 0 }, effect: false },
                    hide: 'unfocus',
                    style: { classes: "qtip-bootstrap qtip-shadow ttProfilViewer", width: 700, height: 485, },
                    events: {
                        show: function () {
                            $(this).draggable();
                        }
                    }
                }).qtip("show");
            } else {
                $("#frameProfilViewer").attr('src', url);
                ttProfilViewer.qtip("show");
            }
        };

    };
</script>